<?php

//$ret1 = $db->connect($server);
$mysqlconf = [
    'host' => '120.31.136.107',
    'port' => 3306,
    'user' => 'root',
    'password' => 'd23a048282d9f0e3',
    'database' => 'system_pay',
    'timeout' => 10
];

Swoole\Coroutine::create(function () use ($mysqlconf) {
    var_dump($mysqlconf);
    $db = new Swoole\Coroutine\Mysql();
    $ret1 = $db->connect($mysqlconf);
    $res =$ret1->query("select sleep(1)");

});